import { memo } from "react";
const CacheChildren1 = memo((props) => {
  console.log("CacheChildren1子组件");
  // const { msg } = props;
  const handleClick = () => {
    props.msg!();
    // msg && msg();
  };
  return (
    <>
      <h1>CacheChildren1</h1>
      <button onClick={handleClick}>修改</button>
    </>
  );
});

export default CacheChildren1;
